#include <bits/stdc++.h>
using namespace std;
#define N 1000005
int n, m, a[N], c[N];
int main() {
    freopen("color.in", "r", stdin);
    freopen("color.out", "w", stdout);
    for (int i = 1; i <= 32; i++) {
        cin >> a[i];
    }
    cout << 5 << endl;
    cout << 19 << endl;
    cout << 7 << endl;
    cout << 1 << endl;
    return 0;
}